Latch circuit, latch method, and electronic device

ABSTRACT

The present disclosure relates to a latch circuit and a latch method, and an electronic device, and relates to the technical field of integrated circuits. The latch circuit includes: a transmission module, a latch module, and a control module, wherein the transmission module is configured to transmit an input signal to the latch module; the latch module is configured to latch the input signal or output the input signal when a set signal or a reset signal is at a low level; and the control module is configured to perform control, such that a current leakage path cannot be formed between the transmission module and the latch module when the set signal or the reset signal is at a high level.

CROSS-REFERENCE TO RELATED APPLICATIONS

This is a continuation of International Application No.PCT/CN2021/120145, filed on Sep. 24, 2021, which claims the priority toChinese Patent Application No. 202110815241.1, titled “LATCH CIRCUIT,LATCH METHOD, AND ELECTRONIC DEVICE” and filed with the China NationalIntellectual Property Administration (CNIPA) on Jul. 19, 2021. Theentire contents of International Application No. PCT/CN2021/120145 andChinese Patent Application No. 202110815241.1 are incorporated herein byreference.

TECHNICAL FIELD

The present disclosure relates to, but is not limited to, a latchcircuit, a latch method, and an electronic device.

BACKGROUND

A latch circuit is a logic element that has a memory function in adigital circuit and can temporarily store a signal to maintain aparticular level state, for example, record binary digital signals “0”and “1” in the digital circuit.

When a set signal or a reset signal is at a low level, the latch circuitcan usually transmit data or perform latching normally. However, whenthe set signal or reset signal is at a high level, the latch circuitoften generates a current leakage path, leading to power consumption.

It should be noted that information disclosed in the foregoingbackground part is used merely for a better understanding of thebackground of the present disclosure, and therefore may includeinformation that does not constitute the prior art known to those ofordinary skill in the art.

SUMMARY

An overview of the subject matter detailed in the present disclosure isprovided below, which is not intended to limit the protection scope ofthe claims.

An objective of the present disclosure is to provide a latch circuit, alatch method, and an electronic device.

According to a first aspect of the present disclosure, a latch circuitis provided, including: a transmission module, a latch module, and acontrol module, wherein

the transmission module is configured to transmit an input signal to thelatch module;

the latch module is configured to latch the input signal or output theinput signal when a set signal or a reset signal is at a low level; and

the control module is configured to perform control, such that a currentleakage path cannot be formed between the transmission module and thelatch module when the set signal or the reset signal is at a high level.

According to a second aspect of the present disclosure, a latch methodof a latch circuit is provided, the method is applied to the latchcircuit, and the latch circuit includes: a transmission module, a latchmodule, and a control module. The method includes:

transmitting an input signal to the latch module through thetransmission module; and

when a set signal or a reset signal is at a low level, latching theinput signal or outputting the input signal by using the latch module;and

when the set signal or the reset signal is at a high level, performingcontrol by using the control module, such that a current leakage pathcannot be formed between the transmission module and the latch module.

According to a third aspect of the present disclosure, an electronicdevice is provided, including the foregoing latch circuit.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings incorporated into the specification andconstituting part of the specification illustrate the embodiments of thepresent disclosure, and are used together with the description toexplain the principles of the embodiments of the present disclosure. Inthese accompanying drawings, similar reference numerals are used torepresent similar elements. The accompanying drawings in the followingdescription are part rather than all of the embodiments of the presentdisclosure. Those skilled in the art may derive other drawings based onthese drawings without creative efforts.

FIG. 1 is a schematic structural diagram of a logical symbol of a latchaccording to an exemplary implementation of the present disclosure;

FIG. 2 is a schematic structural diagram of a logical symbol of anotherlatch according to an exemplary implementation of the presentdisclosure;

FIG. 3 is an architectural diagram of a latch circuit according to anexemplary implementation of the present disclosure;

FIG. 4 is a schematic structural diagram of a latch circuit according toan exemplary implementation of the present disclosure;

FIG. 5 is a schematic structural diagram of a control module in thelatch circuit shown in FIG. 4 ;

FIG. 6 is a schematic structural diagram of another control module inthe latch circuit shown in FIG. 4 ;

FIG. 7 is a schematic structural diagram of another latch circuitaccording to an exemplary implementation of the present disclosure;

FIG. 8 is a schematic structural diagram of a control module in thelatch circuit shown in FIG. 7 ;

FIG. 9 is a schematic structural diagram of another control module inthe latch circuit shown in FIG. 7 ; and

FIG. 10 is a flowchart of a latch method of a latch circuit according toan exemplary implementation of the present disclosure.

DETAILED DESCRIPTION

To make the objectives, technical solutions, and advantages of theembodiments of the present disclosure clearer, the following clearly andcompletely describes the technical solutions in the embodiments of thepresent disclosure with reference to the accompanying drawings in theembodiments of the present disclosure. Apparently, the describedembodiments are some but not all of the embodiments of the presentdisclosure. All other embodiments obtained by those skilled in the artbased on the embodiments of the present disclosure without creativeefforts should fall within the protection scope of the presentdisclosure. It should be noted that the embodiments in the presentdisclosure and features in the embodiments may be combined with eachother in a non-conflicting manner.

A latch is a logic element having a memory function. A state of anoutput terminal thereof does not change with a state of an inputterminal. An input state is saved to the output only when there is alatch signal, and there is no change until a next latch signal arrives.

FIG. 1 and FIG. 2 shows logical symbols of two types of latches. It canbe learned from FIG. 1 and FIG. 2 that the two types of latches are eacha latch D, and the latch is controlled by using two clock signals CKTand CKB that are opposite to each other to latch an input signal D oroutput signals Q and QB that are opposite to each other. The inputsignal D may be a digital signal, and the latch may be configured tolatch or output the digital signal.

A difference lies in that a latch signal of the latch in FIG. 1 is areset signal RST, and a latch signal of the latch in FIG. 2 is a setsignal SET. When the reset signal RST or the set signal SET is at a lowlevel, a latching or output function of the latch can normally work;when the reset signal RST or the set signal SET is at a high level, Q isforcibly output at the low level when being output.

However, the latch usually has a problem that when the reset signal RSTor the set signal SET is at the high level, the input signal D, and theclock signals CKT and CKB are indeterminate, which may lead to apossibility of generating a current leakage path in the latch, thuscausing occurrence of current leakage, resulting in power consumptionand even a functional failure of the latch.

Based on this, an exemplary implementation of the present disclosureprovides a latch circuit. Referring to FIG. 3 , a latch circuit 100provided in an exemplary implementation of the present disclosure maymainly include: a transmission module 110, a latch module 120, and acontrol module 130.

The transmission module 110 may be configured to transmit an inputsignal D to the latch module 120. The latch module 120 may be configuredto latch the input signal D or output the input signal D when a setsignal SET or a reset signal RST is at a low level. The control module130 may be configured to perform control, such that a current leakagepath cannot be formed between the transmission module 110 and the latchmodule 120 when the set signal SET or the reset signal RST is at a highlevel.

According to the provided latch circuit, when the set signal SET or thereset signal RST is at the low level, the latch circuit may normallylatch the input signal, or may output the latched signal according to arequirement. Especially when the set signal SET or the reset signal RSTis at the high level, the control module can avoid forming the currentleakage path between the transmission module and the latch module,thereby avoiding current leakage, reducing power consumption, andfurther avoiding the functional failure of the latch circuit due to thecurrent leakage.

In an exemplary implementation of the present disclosure, in a processin which the control module 130 performs controlling, such that thecurrent leakage path cannot be formed between the transmission module110 and the latch module 120, there may be a plurality of manners. Forexample, when the set signal SET or the reset signal RST is at the highlevel, the transmission module 110 is turned off, to avoid forming thecurrent leakage path between the transmission module 110 and the latchmodule 120. Alternatively, when the reset signal RST is at the highlevel, the input signal D is controlled to be at the low level; when theset signal SET is at the high level, the input signal D is controlled tobe at the high level, such that an objective of avoiding forming thecurrent leakage path between the transmission module 110 and the latchmodule 120 can also be achieved.

In the following, a latch circuit controlled by dual clock signals CKTand CKB is mainly used as an example to describe in detail an internalstructure and a working principle of the latch circuit provided in thepresent disclosure. Other latch circuits controlled by a single clocksignal or multiple clock signals can be implemented by reference.

Implementation 1:

Referring to FIG. 4 and FIG. 5 , in a latch circuit provided in anexemplary implementation of the present disclosure, a transmissionmodule 110 includes a first NMOS transistor 111 and a first PMOStransistor 112 connected in parallel. In addition, the first NMOStransistor 111 is controlled by a first clock signal CKT, and the firstPMOS transistor 112 is controlled by a second clock signal CKB that isopposite to the first clock signal CKT. An input signal D may betransmitted to a latch module 120 through the transmission module 110.In FIG. 4 , the latch module 120 connected to the transmission module110 includes a reset portion 121 and a first latch portion, and thefirst latch portion includes: a first enable inverter 122, and a fifthinverter 123 and a sixth inverter 124 connected in series. An outputterminal of the sixth inverter 124 outputs an output signal Q of thelatch circuit. In addition, an input terminal of the first enableinverter 122 is connected to an output terminal of the fifth inverter123; and an output terminal of the first enable inverter 122 isconnected to an input terminal of the fifth inverter 123. In otherwords, the first enable inverter 122 and the fifth inverter 123 are alsoconnected in series.

In addition, the reset portion 121 mainly includes a second NMOStransistor coupled between the first latch portion and a terminal of aground voltage, and receives a reset signal RST by using a gate of thesecond NMOS transistor. Specifically, the second NMOS transistor iscoupled between the input terminal of the fifth inverter 123 of thefirst latch portion and the terminal of a ground voltage. Usually, thereset signal RST has two types of logical level states, namely, a highlevel and a low level.

For the latch circuit including only the transmission module 110 and thelatch module 120 shown in FIG. 4 , when the reset signal RST is at thelow level, the second NMOS transistor of the reset portion 121 is in anoff state, and a circuit herein is not conducted. Therefore, when thefirst clock signal CKT is at the high level and the second clock signalCKB is at the low level, because an output terminal of the transmissionmodule 110 is connected to the input terminal of the fifth inverter 123,the input signal D may be directly transmitted to the fifth inverter 123through the transmission module 110, then transmitted to the sixthinverter 124 through the fifth inverter 123, and finally given to theoutput signal Q of the sixth inverter 124, that is, Q=D.

When the reset signal RST is at the low level, the corresponding secondNMOS transistor is in an off state. When the first clock signal CKT isat the low level and the second clock signal CKB is at the high level,the transmission module 110 is in an off state. In addition, because thefirst enable inverter 122 enabled by the first clock signal CKT and thesecond clock signal CKB is in an on state when the first clock signalCKT is at the low level and the second clock signal CKB is at the highlevel, the latch module 120 in this case is mainly configured to performlatching to maintain a D value in a previous state, to achieve anobjective of latching the input signal D.

When the reset signal RST is at the high level, because the second NMOStransistor of the reset portion 121 is grounded, the output signal Q isdirectly forcibly output at the low level. However, a value of theoutput signal Q is not affected by the input signal D in this state.Therefore, the input signal D, the first clock signal CKT, and thesecond clock signal CKB in this case are indeterminate, and a possiblecase may exist, that is, when the input signal D is at the high level,the first clock signal CKT is at the high level, and the second clocksignal CKB is at the low level, a current leakage path shown by a dottedline arrow in FIG. 4 is formed between the transmission module 110 andthe reset portion 121, and the input signal D input through the inputterminal causes occurrence of current leakage along the current leakagepath, resulting in power consumption and even a functional failure ofthe latch circuit.

Therefore, to avoid forming the current leakage path, as shown in FIG. 5, a control module 130 provided in an exemplary implementation of thepresent disclosure includes a first NOR gate 131 and a first inverter132, wherein an input terminal of the first NOR gate 131 accesses areset signal RST, and the input terminal of the first NOR gate 131 mayfurther access another clock signal CLKB. After these two signals passthrough the first NOR gate 131, an output terminal of the first NOR gate131 outputs a first clock signal CKT. An input terminal of the firstinverter 132 is connected to the output terminal of the first NOR gate131, and an output terminal of the first inverter 132 outputs a secondclock signal CKB.

It can be learned from a circuit diagram of the control module 130 shownin FIG. 5 that when the reset signal RST is at a high level, the firstNOR gate 131 outputs a low level. In other words, the first clock signalCKT in this case is at the low level and the second clock signal CKB isat the high level. In addition, when the first clock signal CKT is atthe low level and the second clock signal CKB is at the high level, atransmission module 110 is in an off state. In other words, the controlmodule 130 shown in FIG. 5 may be used to turn off the transmissionmodule 110, to avoid forming a current leakage path between thetransmission module 110 and a latch module 120, thereby avoiding currentleakage.

In addition, for the latch circuit formed by FIG. 4 and FIG. 5 , whenthe reset signal RST is at a low level, if the clock signal CLKB is at alow level, a high level is output after the two low levels pass throughthe first NOR gate 131. That is, the first clock signal CKT is at thehigh level and the second clock signal CKB is at the low level in thiscase. When the first clock signal CKT is at a high level and the secondclock signal CKB is at a low level, the transmission module 110 is in anon state, the first enable inverter 122 in this case is in an off state,and the latch module 120 may directly give the input signal D to theoutput signal Q.

When the reset signal RST is at a low level, if the clock signal CLKB isat a high level, a low level is output after the two signals passthrough the first NOR gate 131. That is, the first clock signal CKT isat the low level and the second clock signal CKB is at the high level inthis case. When the first clock signal CKT is at a low level and thesecond clock signal CKB is at a high level, the transmission module 110is in an off state, the first enable inverter 122 in this case is in anon state, and the latch module 120 may perform latching to maintain a Dvalue in a previous state, to achieve an objective of latching the inputsignal D.

It can be learned that the latch circuit formed by FIG. 4 and FIG. 5 mayhave a function of normally outputting the input signal D or latchingthe input signal D when the reset signal RST is at the low level, andmay further turn off the transmission module 110 when the reset signalRST is at the high level, to avoid forming the current leakage path,thereby achieving an objective of avoiding current leakage and reducingpower consumption.

Implementation 2:

For the problem that the current leakage path exists between thetransmission module 110 and the latch module 120 shown in FIG. 4 , anexemplary implementation of the present disclosure further providesanother control module. Referring to FIG. 6 , the control module 130includes a third NOR gate 601 and a third inverter 602, wherein an inputterminal of the third NOR gate 601 accesses a reset signal RST, and theinput terminal of the third NOR gate 601 may further access anotherinverted data transmission signal DB. After these two signals passthrough the third NOR gate 601, an output terminal of the third NOR gate601 outputs an input signal D used to be input to the transmissionmodule 110. An input terminal of the third inverter 602 is connected tothe output terminal of the third NOR gate 601, and an output terminal ofthe third inverter 602 outputs an inverted data delay transmissionsignal DB_Delay.

It can be learned from a circuit diagram of the control module 130 shownin FIG. 6 that when the reset signal RST is at a high level, the thirdNOR gate 601 outputs a low level. In other words, the input signal D inthis case is at a low level VSS. Even if a first clock signal CKT is ata high level, a second clock signal CKB is at a low level, and thetransmission module 110 in an on state in this case, because the inputsignal D input by the transmission module 110 is at the low level VSS, acurrent leakage path is not formed between the transmission module 110and a reset portion 121, thereby avoiding forming a current leakage pathbetween the transmission module 110 and the latch module 120. This mayalso avoid current leakage.

In addition, for the latch circuit formed by FIG. 4 and FIG. 6 , whenthe reset signal RST is at a low level, if the inverted datatransmission signal DB is at a low level, a high level is output afterthe two low levels pass through the third NOR gate 601. That is, theinput signal D in this case is at the high level. Whether the latchmodule 120 directly gives the input signal D to the output signal Q orlatches the input signal D may be determined depending on whether thetransmission module 110 is in an on state or an off state.

When the reset signal RST is at a low level, if the inverted datatransmission signal DB is at a high level, a low level is output afterthe two signals pass through the third NOR gate 601. That is, the inputsignal D in this case is at the low level. Whether the latch module 120directly gives the input signal D to the output signal Q or latches theinput signal D may be determined depending on whether the transmissionmodule 110 is in an on state or an off state.

It can be learned that the latch circuit formed by FIG. 4 and FIG. 6 mayhave a function of normally outputting the input signal D or latchingthe input signal D when the reset signal RST is at the low level, andmay further control the input signal D to be at the low level when thereset signal RST is at the high level, to avoid forming the currentleakage path, thereby achieving an objective of avoiding current leakageand reducing power consumption.

Implementation 3:

Referring to FIG. 7 and FIG. 8 , in a latch circuit provided in anexemplary implementation of the present disclosure, a transmissionmodule 110 includes a first NMOS transistor 111 and a first PMOStransistor 112 connected in parallel. In addition, the first NMOStransistor 111 is controlled by a first clock signal CKT, and the firstPMOS transistor 112 is controlled by a second clock signal CKB that isopposite to the first clock signal CKT. An input signal D may betransmitted to a latch module 120 through the transmission module 110.In FIG. 7 , the latch module 120 connected to the transmission module110 includes a set portion 710 and a second latch portion, and thesecond latch portion includes: a second enable inverter 720, and aseventh inverter 730 and an eighth inverter 740 connected in series. Anoutput terminal of the eighth inverter 740 outputs an output signal Q ofthe latch circuit. In addition, an input terminal of the second enableinverter 720 is connected to an output terminal of the seventh inverter730; and an output terminal of the second enable inverter 720 isconnected to an input terminal of the seventh inverter 730. In otherwords, the second enable inverter 720 and the seventh inverter 730 arealso connected in series.

In addition, the set portion 710 mainly includes a second PMOStransistor 711 coupled between a terminal of a power supply voltage andthe second latch portion, and receives an inverted signal of the setsignal SET through a gate of the second PMOS transistor 711.Specifically, the set signal SET is inverted by providing a set signalinverter 712 at the gate of the second PMOS transistor 711. In addition,the second PMOS transistor 711 is specifically coupled between theterminal of the power supply voltage and the input terminal of theseventh inverter 730 of the second latch portion. Usually, the setsignal SET has two types of logical level states, namely, a high leveland a low level.

For the latch circuit including only the transmission module 110 and thelatch module 120 shown in FIG. 7 , when the set signal SET is at the lowlevel, the second PMOS transistor 711 of the set portion 710 is in anoff state, and a circuit herein is not conducted. Therefore, when thefirst clock signal CKT is at the high level and the second clock signalCKB is at the low level, because an output terminal of the transmissionmodule 110 is connected to the input terminal of the seventh inverter730, the input signal D may be directly transmitted to the seventhinverter 730 through the transmission module 110, then transmitted tothe eighth inverter 740 through the seventh inverter 730, and finallygiven to the output signal Q of the eighth inverter 740, that is, Q=D.

When the set signal SET is at the low level, the corresponding secondPMOS transistor 711 is in an off state. When the first clock signal CKTis at the low level and the second clock signal CKB is at the highlevel, the transmission module 110 is in an off state. In addition,because the second enable inverter 720 enabled by the first clock signalCKT and the second clock signal CKB is in an on state when the firstclock signal CKT is at the low level and the second clock signal CKB isat the high level, the latch module 120 in this case is mainlyconfigured to perform latching to maintain a D value in a previousstate, to achieve an objective of latching the input signal D.

When the set signal SET is at the high level, because the second PMOStransistor 711 of the set portion 710 is connected to a power supply,the output signal Q is directly forcibly output at the high level.However, a value of the output signal Q is not affected by the inputsignal D in this state. Therefore, the input signal D, the first clocksignal CKT, and the second clock signal CKB in this case areindeterminate, and a possible case may exist, that is, when the inputsignal D is at the low level, the first clock signal CKT is at the highlevel, and the second clock signal CKB is at the low level, a currentleakage path shown by a dotted line arrow in FIG. 7 is formed betweenthe transmission module 110 and the set portion 710, and a power supplysignal causes occurrence of current leakage along the current leakagepath, resulting in power consumption and even a functional failure ofthe latch circuit.

Therefore, to avoid forming the current leakage path, as shown in FIG. 8, a control module 130 provided in an exemplary implementation of thepresent disclosure includes a second NOR gate 801 and a second inverter802, wherein an input terminal of the second NOR gate 801 accesses a setsignal SET, and the input terminal of the second NOR gate 801 mayfurther access another clock signal CLKB. After these two signals passthrough the second NOR gate 801, an output terminal of the second NORgate 801 outputs a first clock signal CKT. An input terminal of thesecond inverter 802 is connected to the output terminal of the secondNOR gate 801, and an output terminal of the second inverter 802 outputsa second clock signal CKB.

It can be learned from a circuit diagram of the control module 130 shownin FIG. 8 that when the set signal SET is at a high level, the secondNOR gate 801 outputs a low level. In other words, the first clock signalCKT in this case is at the low level and the second clock signal CKB isat the high level. In addition, when the first clock signal CKT is atthe low level and the second clock signal CKB is at the high level, atransmission module 110 is in an off state. In other words, the controlmodule 130 shown in FIG. 8 may be used to turn off the transmissionmodule 110, to avoid forming a current leakage path between thetransmission module 110 and a latch module 120, thereby avoiding currentleakage.

In addition, for the latch circuit formed by FIG. 7 and FIG. 8 , whenthe set signal SET is at a low level, the set portion 710 is turned off.If the clock signal CLKB is at a low level, a high level is output afterthe two low levels pass through the second NOR gate 801. That is, thefirst clock signal CKT is at the high level and the second clock signalCKB is at the low level in this case. When the first clock signal CKT isat a high level and the second clock signal CKB is at a low level, thetransmission module 110 is in an on state, the second enable inverter720 in this case is in an off state, and the latch module 120 maydirectly give the input signal D to the output signal Q.

When the set signal SET is at a low level, the set portion 710 is turnedoff. If the clock signal CLKB is at a high level, a low level is outputafter the two signals pass through the second NOR gate 801. That is, thefirst clock signal CKT is at the low level and the second clock signalCKB is at the high level in this case.

When the first clock signal CKT is at a low level and the second clocksignal CKB is at a high level, the transmission module 110 is in an offstate, the second enable inverter 720 in this case is in an on state,and the latch module 120 may perform latching to maintain a D value in aprevious state, to achieve an objective of latching the input signal D.

It can be learned that the latch circuit formed by FIG. 7 and FIG. 8 mayhave a function of normally outputting the input signal D or latchingthe input signal D when the set signal SET is at the low level, and mayfurther turn off the transmission module 110 when the set signal SET isat the high level, to avoid forming the current leakage path, therebyachieving an objective of avoiding current leakage and reducing powerconsumption.

Implementation 4:

For the problem that the current leakage path exists between thetransmission module 110 and the latch module 120 shown in FIG. 7 , anexemplary implementation of the present disclosure further providesanother control module. Referring to FIG. 9 , the control module 130includes a fourth NOR gate 901 and a fourth inverter 902, wherein aninput terminal of the fourth NOR gate 901 accesses a set signal SET, andthe input terminal of the fourth NOR gate 901 may further access anothersignal DC, wherein the signal DC may be an original input signal D.After the two signals pass through the fourth NOR gate 901, an outputterminal of the fourth NOR gate 901 outputs, through the fourth inverter902, a changed input signal D to be input to the transmission module110. An input terminal of the fourth inverter 902 is connected to theoutput terminal of the fourth NOR gate 901, and an output terminal ofthe fourth inverter 902 outputs an inverted data transmission signal DB.

It can be learned from a circuit diagram of the control module 130 shownin FIG. 9 that when the set signal SET is at a high level, the fourthNOR gate 901 outputs a low level, and the input signal D in this case isat a high level VDD after passing through the fourth inverter 902. Evenif a first clock signal CKT is at a high level, a second clock signalCKB is at a low level, and the transmission module 110 in an on state inthis case, because the input signal D input by the transmission module110 is at the high level VDD, a current leakage path is not formedbetween the transmission module 110 and a set portion 710, therebyavoiding forming a current leakage path between the transmission module110 and the latch module 120. This may also avoid current leakage.

In addition, for the latch circuit formed by FIG. 7 and FIG. 9 , whenthe set signal SET is at a low level, the set portion 710 is turned off.If the signal DC is at a low level, a high level is output after the twolow levels pass through the fourth NOR gate 901, and the input signal Din this case is at a low level after passing through the fourth inverter902. Whether the latch module 120 directly gives the input signal D tothe output signal Q or latches the input signal D may be determineddepending on whether the transmission module 110 is in an on state or anoff state.

When the set signal SET is at a low level, the set portion 710 is turnedoff. If the signal DC is at a high level, a low level is output afterthese two signals pass through the fourth NOR gate 901, and the inputsignal D in this case is at a high level after passing through thefourth inverter 902. Whether the latch module 120 directly gives theinput signal D to the output signal Q or latches the input signal D maybe determined depending on whether the transmission module 110 is in anon state or an off state.

It can be learned that the latch circuit formed by FIG. 7 and FIG. 9 mayhave a function of normally outputting the input signal D or latchingthe input signal D when the set signal SET is at the low level, and mayfurther control the input signal D to be at the high level when the setsignal SET is at the high level, to avoid forming the current leakagepath, thereby achieving an objective of avoiding current leakage andreducing power consumption.

It can be learned with reference to the foregoing four implementationsthat, in the latch circuit provided in the exemplary implementations ofthe present disclosure, the control module is used to control the inputsignal or the clock signal that needs to be input, such that when theset signal or the reset signal is at a high level, a current leakagepath cannot be formed between the transmission module and the latchmodule through controlling, thereby avoiding occurrence of currentleakage in this case, and achieving an objective of reducing powerconsumption. In addition, for the input signal or the clock signalprocessed through the control module, when the set signal or the resetsignal is at a low level, the input signal D can be normally output orthe input signal D can be normally latched, which has no impact on afunction of the latch circuit.

An exemplary implementation of the present disclosure further provides alatch method of a latch circuit, applied to the foregoing latch circuit.The latch circuit includes: a transmission module, a latch module, and acontrol module. Referring to FIG. 10 , the latch method may specificallyinclude the following steps:

Step S102. Transmit an input signal to the latch module through thetransmission module.

Step S104. When the set signal or the reset signal is at a low level,latch the input signal or output the input signal through the latchmodule.

Step S106. When the set signal or the reset signal is at a high level,perform control by using the control module, such that a current leakagepath cannot be formed between the transmission module and the latchmodule.

In some embodiments of the present disclosure, performing control byusing the control module, such that the current leakage path cannot beformed between the transmission module and the latch module includes:turning off the transmission module by using the control module, suchthat the current leakage path cannot be formed between the transmissionmodule and the latch module.

In some embodiments of the present disclosure, the transmission moduleincludes: a first NMOS transistor controlled by a first clock signal,and a first PMOS transistor controlled by a second clock signal that isopposite to the first clock signal; and the performing control by usingthe control module, such that the current leakage path cannot be formedbetween the transmission module and the latch module includes: changingthe first clock signal by using the control module, to turn off thetransmission module.

In some embodiments of the present disclosure, and transmission moduleincludes: a first NMOS transistor controlled by a first clock signal,and a first PMOS transistor controlled by a second clock signal that isopposite to the first clock signal; and the performing control by usingthe control module, such that the current leakage path cannot be formedbetween the transmission module and the latch module includes: changingthe input signal to be at a low level by using the control module, suchthat the current leakage path cannot be formed between the transmissionmodule and the latch module.

Specific details of each step in the latch method of the foregoing latchcircuit have been described in detail in the corresponding latchcircuit, and therefore are not repeated herein again.

An exemplary implementation of the present disclosure further provide anelectronic device, and the electronic device may include: the foregoinglatch circuit. A specific structural form and a working principle of thelatch circuit have been described in detail in the foregoingembodiments, and details are not described herein again.

The foregoing embodiments may be implemented in whole or in part bysoftware, hardware, firmware, or any combination thereof. When asoftware program is used for implementation, the implementation can beperformed in a form of a computer program product in whole or in part.The computer program product includes one or more computer instructions.When the computer program instructions are loaded and executed on acomputer, the procedures or functions according to the embodiments ofthe present disclosure are all or partially generated. The computer maybe a general-purpose computer, a dedicated computer, a computer network,or another programmable device. The computer instructions may be storedin a computer-readable storage medium, or may be transmitted from onecomputer-readable storage medium to another computer-readable storagemedium. The computer-readable storage medium may be any usable mediumaccessible by a computer, or a data storage device, such as a server ora data center, integrating one or more usable media. The usable mediummay be a magnetic medium (such as a floppy disk, a hard disk, or amagnetic tape), an optical medium (such as a DVD), a semiconductormedium (such as a solid state disk (SSD)), or the like. In theembodiments of the present disclosure, the computer may include theforegoing devices.

The embodiments or implementations of this specification are describedin a progressive manner, and each embodiment focuses on differences fromother embodiments. The same or similar parts between the embodiments mayrefer to each other.

In the description of the specification, the description with referenceto terms such as “an embodiment”, “an exemplary embodiment”, “someimplementations”, “a schematic implementation”, and “an example” meansthat the specific feature, structure, material, or characteristicdescribed in combination with the implementation(s) or example(s) isincluded in at least one implementation or example of the presentdisclosure.

In this specification, the schematic expression of the above terms doesnot necessarily refer to the same implementation or example. Moreover,the described specific feature, structure, material, or characteristicmay be combined in an appropriate manner in any one or moreimplementations or examples.

It should be noted that in the description of the present disclosure,the terms such as “center”, “top”, “bottom”, “left”, “right”,“vertical”, “horizontal”, “inner”, and “outer” indicate the orientationor position relationships based on the accompanying drawings. Theseterms are merely intended to facilitate description of the presentdisclosure and simplify the description, rather than to indicate orimply that the mentioned device or element must have a specificorientation and must be constructed and operated in a specificorientation. Therefore, these terms should not be construed as alimitation to the present disclosure.

It can be understood that the terms such as “first” and “second” used inthe present disclosure can be used to describe various structures, butthese structures are not limited by these terms. Instead, these termsare merely intended to distinguish one element from another.

The same elements in one or more accompanying drawings are denoted bysimilar reference numerals. For the sake of clarity, various parts inthe accompanying drawings are not drawn to scale. In addition, somewell-known parts may not be shown. For the sake of brevity, thestructure obtained by implementing a plurality of steps may be shown inone figure. In order to make the understanding of the present disclosuremore clearly, many specific details of the present disclosure, such asthe structure, material, size, processing process, and technology of thedevice, are described below. However, as those skilled in the art canunderstand, the present disclosure may not be implemented according tothese specific details.

Finally, it should be noted that the above embodiments are merelyintended to explain the technical solutions of the present disclosure,rather than to limit the present disclosure. Although the presentdisclosure is described in detail with reference to the aboveembodiments, those skilled in the art should understand that they maystill modify the technical solutions described in the above embodiments,or make equivalent substitutions of some or all of the technicalfeatures recorded therein, without deviating the essence of thecorresponding technical solutions from the scope of the technicalsolutions of the embodiments of the present disclosure.

INDUSTRIAL APPLICABILITY

According to the latch circuit provided in the present disclosure, whena set signal or a reset signal is at a low level, an input signal can benormally latched, or a latched signal can be output according to arequirement; or when a set signal or a reset signal is at a high level,the control module may be used to avoid forming a current leakage pathbetween the transmission module and the latch module, thereby avoidingcurrent leakage, reducing power consumption, and further avoiding afunctional failure of the latch circuit due to the current leakage.

1. A latch circuit, comprising: a transmission module, a latch module,and a control module, wherein the transmission module is configured totransmit an input signal to the latch module; the latch module isconfigured to latch the input signal or output the input signal when aset signal or a reset signal is at a low level; and the control moduleis configured to perform control, such that a current leakage pathcannot be formed between the transmission module and the latch modulewhen the set signal or the reset signal is at a high level.
 2. Thecircuit according to claim 1, wherein the transmission module comprisesa first N-type metal-oxide-semiconductor (NMOS) transistor and a firstP-type metal-oxide-semiconductor (PMOS) transistor connected inparallel; and the control module is configured to change a first clocksignal, to turn off the transmission module.
 3. The circuit according toclaim 2, wherein the control module comprises a first NOR gate and afirst inverter, wherein an input terminal of the first NOR gate accessesthe reset signal, and an output terminal of the first NOR gate outputsthe first clock signal; and an input terminal of the first inverter isconnected to the output terminal of the first NOR gate, and an outputterminal of the first inverter outputs a second clock signal.
 4. Thecircuit according to claim 2, wherein the control module comprises asecond NOR gate and a second inverter, wherein an input terminal of thesecond NOR gate accesses the set signal, and an output terminal of thesecond NOR gate outputs the first clock signal; and an input terminal ofthe second inverter is connected to the output terminal of the secondNOR gate, and an output terminal of the second inverter outputs a secondclock signal.
 5. The circuit according to claim 1, wherein the controlmodule is configured to control the input signal to be at the low levelwhen the reset signal is at the high level; or control the input signalto be at the high level when the set signal is at the high level, suchthat the current leakage path cannot be formed between the transmissionmodule and the latch module.
 6. The circuit according to claim 5,wherein the control module comprises a third NOR gate and a thirdinverter, wherein an input terminal of the third NOR gate accesses thereset signal, and an output terminal of the third NOR gate outputs theinput signal; and an input terminal of the third inverter is connectedto the output terminal of the third NOR gate, and an output terminal ofthe third inverter outputs an inverted data delay transmission signal.7. The circuit according to claim 5, wherein the control modulecomprises a fourth NOR gate and a fourth inverter, wherein an inputterminal of the fourth NOR gate accesses the set signal, and an outputterminal of the fourth NOR gate outputs the input signal; and an inputterminal of the fourth inverter is connected to the output terminal ofthe fourth NOR gate, and an output terminal of the fourth inverteroutputs an inverted data transmission signal.
 8. The circuit accordingto claim 3, wherein the latch module comprises a reset portion and afirst latch portion, wherein the reset portion comprises a second NMOStransistor coupled between the first latch portion and a terminal of aground voltage, and receives the reset signal by using a gate of thesecond NMOS transistor.
 9. The circuit according to claim 8, wherein thefirst latch portion comprises: a first enable inverter, and a fifthinverter and a sixth inverter connected in series, wherein an inputterminal of the first enable inverter is connected to an output terminalof the fifth inverter; and an output terminal of the first enableinverter is connected to an input terminal of the fifth inverter; thesecond NMOS transistor is coupled to the input terminal of the fifthinverter; and an output terminal of the transmission module is connectedto the input terminal of the fifth inverter.
 10. The circuit accordingto claim 4, wherein the latch module comprises a set portion and asecond latch portion, wherein the set portion comprises a second PMOStransistor coupled between a terminal of a power supply voltage and thesecond latch portion, and receives an inverted signal of the set signalby using a gate of the second PMOS transistor.
 11. The circuit accordingto claim 10, wherein the second latch portion comprises: a second enableinverter, and a seventh inverter and an eighth inverter connected inseries, wherein an input terminal of the second enable inverter isconnected to an output terminal of the seventh inverter; and an outputterminal of the second enable inverter is connected to an input terminalof the seventh inverter; the second PMOS transistor is coupled to theinput terminal of the seventh inverter; and an output terminal of thetransmission module is connected to the input terminal of the seventhinverter.
 12. A latch method of a latch circuit, wherein the method isapplied to the latch circuit, and the latch circuit comprises: atransmission module, a latch module, and a control module; and themethod comprises: transmitting an input signal to the latch modulethrough the transmission module; when a set signal is at a low level,latching the input signal or outputting the input signal by using thelatch module; and when the set signal is at a high level, performingcontrol by using the control module, such that a current leakage pathcannot be formed between the transmission module and the latch module.13. The method according to claim 12, further comprising: when a resetsignal is at a low level, latching the input signal or outputting theinput signal by using the latch module; and when the reset signal is ata high level, performing control by using the control module, such thata current leakage path cannot be formed between the transmission moduleand the latch module.
 14. The method according to claim 12, wherein theperforming control by using the control module, such that the currentleakage path cannot be formed between the transmission module and thelatch module comprises: turning off the transmission module by using thecontrol module, such that the current leakage path cannot be formedbetween the transmission module and the latch module.
 15. The methodaccording to claim 14, wherein the transmission module comprises: afirst N-type metal-oxide-semiconductor (NMOS) transistor controlled by afirst clock signal, and a first P-type metal-oxide-semiconductor (PMOS)transistor controlled by a second clock signal that is opposite to thefirst clock signal; and the performing control by using the controlmodule, such that the current leakage path cannot be formed between thetransmission module and the latch module comprises: changing the firstclock signal by using the control module, to turn off the transmissionmodule.
 16. The method according to claim 12, wherein the transmissionmodule comprises: a first N-type metal-oxide-semiconductor (NMOS)transistor controlled by a first clock signal, and a first P-typemetal-oxide-semiconductor (PMOS) transistor controlled by a second clocksignal that is opposite to the first clock signal; and the performingcontrol by using the control module, such that the current leakage pathcannot be formed between the transmission module and the latch modulecomprises: when a reset signal is at the high level, controlling theinput signal to be at the low level by using the control module; or whenthe set signal is at the high level, controlling the input signal to beat the high level by using the control module, such that the currentleakage path cannot be formed between the transmission module and thelatch module.
 17. An electronic device, wherein the electronic devicecomprises the latch circuit according to claim
 1. 18. The methodaccording to claim 13, wherein the performing control by using thecontrol module, such that the current leakage path cannot be formedbetween the transmission module and the latch module comprises: turningoff the transmission module by using the control module, such that thecurrent leakage path cannot be formed between the transmission moduleand the latch module.
 19. The method according to claim 18, wherein thetransmission module comprises: a first N-type metal-oxide-semiconductor(NMOS) transistor controlled by a first clock signal, and a first P-typemetal-oxide-semiconductor (PMOS) transistor controlled by a second clocksignal that is opposite to the first clock signal; and the performingcontrol by using the control module, such that the current leakage pathcannot be formed between the transmission module and the latch modulecomprises: changing the first clock signal by using the control module,to turn off the transmission module.
 20. The method according to claim13 wherein the transmission module comprises: a first N-typemetal-oxide-semiconductor (NMOS) transistor controlled by a first clocksignal, and a first P-type metal-oxide-semiconductor (PMOS) transistorcontrolled by a second clock signal that is opposite to the first clocksignal; and the performing control by using the control module, suchthat the current leakage path cannot be formed between the transmissionmodule and the latch module comprises: when the reset signal is at thehigh level, controlling the input signal to be at the low level by usingthe control module; or when the set signal is at the high level,controlling the input signal to be at the high level by using thecontrol module, such that the current leakage path cannot be formedbetween the transmission module and the latch module.